1. Field of the Invention
This invention relates generally to computerized configuring systems. More specifically, this invention relates to a system and method for testing the compatibility of parts included in a configuration.
2. Description of the Related Art
Many products are comprised of individual parts or components. Currently, configuring systems, also referred to as configuration engines, are available that allow a user to configure a product by interactively selecting components from among various groups based on availability and compatibility of features and options for the product. One known system is described in U.S. Pat. No. 5,825,651, entitled xe2x80x9cMethod and Apparatus For Maintaining and Configuring Systems,xe2x80x9d issued Oct. 20, 1998, (hereinafter the xe2x80x9c""651 patentxe2x80x9d), which is assigned to the same assignee as the present invention, and is hereby incorporated by reference.
In one embodiment of a configuration system disclosed in the ""651 patent, a framework for defining a product line includes a set of related components that are selected from a parts catalog. A product might consist of several hundred individual parts that are organized into part groups and are available on one or more of a number of products. A product is modeled by describing which parts and part groups are available in that product and which choices must be made from within the part groups, and then by writing additional rules that describe part-to-part relationships which are not modeled by the product structure. A compiler converts the product structure and the rules into four rule types: includes (parts that are included by default), excludes, removes, and requires choice (a choice among a group of parts that must be made to achieve a valid configuration). Parts may also be classified as optional which signifies that they can be optionally included in the configuration.
After compilation, there may be several hundred, several thousand, or even more of these rules. When the system loads the model, all parts and products should initially be in a xe2x80x9cselectablexe2x80x9d state, which means that the client or user is allowed to choose them. When the client selects a part, that part is put in the xe2x80x9cselectedxe2x80x9d state. Parts that are included by the selected parts enter the xe2x80x9cincludedxe2x80x9d state, and parts that are excluded by the selected parts enter the xe2x80x9cexcludedxe2x80x9d state. Parts that were previously included but are removed by a xe2x80x9cremovesxe2x80x9d rule are in the xe2x80x9cdeletedxe2x80x9d state. Each part must always be in exactly one state. Parts that are selected by a user or are included are referred to as xe2x80x9cselectedxe2x80x9d. Parts that are excluded or deleted are referred to as xe2x80x9cnot selectablexe2x80x9d.
As product models grow in size and complexity, configuration errors may occur when a rule or series of rules is not properly defined and produces an undesired effect, such as the exclusion of a part that should be selectable. Configuration errors may also occur when a series of improperly defined rules causes a part to be in more than one state at the same time, such as xe2x80x9cincludedxe2x80x9d and xe2x80x9cexcludedxe2x80x9d, or xe2x80x9cselectedxe2x80x9d and xe2x80x9cdeletedxe2x80x9d.
For large models, such errors may be difficult to find due to the large number of rules in the model, the unexpected effects of some configuration operations, and the complex interactions between rules. It is therefore desirable to have an automated testing tool to locate and analyze configuration errors, so that the rules may be corrected.
The invention provides in one embodiment the ability to test rules in a rule-based system for configuring a product. A configuration system defines the components of a product using elements contained in a parts catalog and rules that define relationships between the components of a product. The user provides test cases that select at least one part to include in the product configuration, and the configuration tester processes the rule to determine whether the at least one part selected in the test case conflicts with the plurality of parts previously included in the product configuration.
In one embodiment, the invention provides a method of testing a product configuration in a system for generating product configurations that include a variety of component parts. The configuration system includes one or more rules that define a relationship between at least two parts. The method includes entering a test case that selects at least one part to include in the product configuration. The system then processes the rule to determine whether part selected in the test case conflicts with parts that are already included in the product configuration, that is, whether the rule conflicts with other rules.
To test new rules, one embodiment of the invention initializes the configuration system with a part state and inputs at least one part selection as specified in the test case. A component referred to as a xe2x80x9clistenerxe2x80x9d detects state change events that result in the system being in the initialized part state. Another component of the invention generates a cause that explains the part state in terns of the state change event, and generates a new part state for each part associated with the cause. The invention then determines the cause or causes that explain the new part states in terms of the state change event.
One feature of an embodiment of the invention generates a cause tree wherein the root of the cause tree is the initial part state, and xe2x80x9cleavesxe2x80x9d of the tree are the user""s selections of parts.
Another component of an embodiment of the invention is an xe2x80x9cexplainerxe2x80x9d which generates an explanation of the part state wherein the part selections are the root of the explanation and the causes follow from the part selections. The explanation(s) are based on selection of a part, execution of a rule, a part being in two states at the same time, a requires choice rule that cannot be satisfied, or on a look ahead process. To provide an explanation of how the system arrived at a particular part state, the invention sorts the tree by iteration number, wherein the iteration number of a part state is determined by measuring the longest distance between the part state and the cause corresponding to the part state.
In another embodiment, the invention is distributed as an article of manufacture, namely a computer usable medium having computer readable program code embodied therein for testing a product configuration in a system for generating product configurations. The system includes at least one rule defining a relationship between at least two parts, and the product configuration includes a plurality of parts.
The computer readable program code is configured to cause a computer to allow a user to enter a test case, wherein the test case selects at least one part to include in the product configuration. The program code then causes a computer to process the at least one rule to determine whether the at least one part selected in the test case conflicts with the plurality of parts previously included in the product configuration. This is accomplished by the computer readable program code causing a computer to initialize the system with a part state, to input the part selection to the system; and to listen to state change events in the system to detect when a state change event occurs that results in the system being in the initialized part state.
The program code then causes a computer system to determine the cause or causes that explain the new part states in terms of the state change event.
One feature of the program code causes a computer to generate a cause tree wherein the root of the cause tree is the initial part state, and xe2x80x9cleavesxe2x80x9d of the tree are the user""s selections of parts.
Another component of the program code causes a computer to execute a component referred to as an xe2x80x9cexplainerxe2x80x9d which generates an explanation of the part state wherein the part selections are the root of the explanation and the causes follow from the part selections. The explanation(s) are based on selection of a part, execution of a rule, a part being in two states at the same time, a requires choice rule that cannot be satisfied, or on a look ahead process. To provide an explanation of how the system arrived at a particular part state, the invention sorts the tree by iteration number, wherein the iteration number of a part state is determined by measuring the longest distance between the part state and the cause corresponding to the part state.
The foregoing has outlined rather broadly the objects, features, and technical advantages of the present invention so that the detailed description of the invention that follows may be better understood.